package com.scy.java.object;
//演示NumberTools
//演示可变参数和数组
public class NumberToolsDemo {
    public static void main(String[] args) {
        NumberTools nt = new NumberTools();
        //使用数组封装参数
        int[] nums = {1,2,3,4,5};
        System.out.println(nt.total(nums));
        System.out.println(nt.totalSum(new int[]{2,4,6,8,10}));
        //使用可变参数
        System.out.println(nt.totalSum(5));
        System.out.println(nt.totalSum(1,3,5));
    }
}
